import { Controller, Get, Query } from '@nestjs/common';
import { ApiBearerAuth } from '@nestjs/swagger';
import { Auth } from 'src/common/decorators/auth.decorator';
import { StageDetailService } from './stage-detail.service';

@Auth()
@ApiBearerAuth()
@Controller('common')
export class StageDetailController {
  constructor(private readonly stageDetailService: StageDetailService) {}

  @Get('getStageMatches')
  async getStageDetail(@Query('stageId') id: string) {
    return this.stageDetailService.getStageDetail(+id);
    // return this.stageDetailService.getStageDetailWithPlayerInfo(+id);
  }
  @Get('getStageDetailWithPlayerInfo')
  async getStageDetailWithPlayerInfo(@Query('stageId') id: string) {
    return this.stageDetailService.getStageDetailWithPlayerInfo(+id);
    // return this.stageDetailService.getStageDetailWithPlayerInfo(+id);
  }
}
